package com.allwees.bs.c.module.product.vo;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.allwees.bs.c.module.product.dto.ProductDetailsDTO;

/**
 * @Author Daniel
 * @Version 1.0.0
 * @Description
 * @CreateTime 2020/10/28 11:25
 */
@JsonIgnoreProperties({"retailPrice","originalPrice","shippingPrice","skus","photos"})
public class ProductVO extends ProductDetailsDTO {
    private static final long serialVersionUID = 3121890830868433224L;
    public ProductVO(){}
    public ProductVO(ProductDetailsDTO dto){
        this.uuid = dto.getUuid();
        this.status = dto.getStatus();
        this.name = dto.getName();
        this.mainPhoto = dto.getMainPhoto();
        this.originalPrice = dto.getOriginalPrice();
        this.retailPrice = dto.getRetailPrice();
        this.shippingPrice = dto.getShippingPrice();
        this.salesTotal = dto.getSalesTotal();
        this.marketingType = dto.getMarketingType();
        this.setUserIsCollection(dto.getUserIsCollection());
    }
}
